# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=glibmm2.68
pkgver=2.72.1
pkgrel=0
pkgdesc="C++ wrapper for the GLib toolkit"
url="https://www.gtkmm.org/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="glib-dev libsigc++3-dev perl meson m4 doxygen graphviz"
checkdepends="glib-networking libsoup"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.gnome.org/sources/glibmm/${pkgver%.*}/glibmm-$pkgver.tar.xz"
builddir="$srcdir/glibmm-$pkgver"

build() {
	abuild-meson -Dbuild-documentation=true . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

dev() {
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/glibmm-${pkgname/glibmm} \
		"$pkgdir"/usr/lib/giomm-${pkgname/glibmm} \
		"$subpkgdir"/usr/lib/
	default_dev
}

check() {
	meson test --no-rebuild -v -C output
}

doc() {
	default_doc
	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/devhelp "$subpkgdir"/usr/share/
}

sha512sums="
aa52c7b73e8f3437c2da9e8da74f84b9f07c7aa40a5fa232a7418b4af19575cbde01f6cbe9fb3fc3227bd9281a9439156a51d10a0c2c1a1beca226c7c93fe660  glibmm-2.72.1.tar.xz
"
